#!/usr/bin/env node
const data=process.argv[2];
const http=require('http');
const url=require('url')
const addr='http://www.baidu.com';
//const postData=querystring,stringfy(data)
let options=url.parse('http://localhost:3000');
options.method='POST'
var req=http.request(options,(res)=>{
  console.log(`HTTP/${res.httpVersion}${res.statusCode}${res.statusMessage}`);
  console.log(res.headers)
  console.log()
  res.on('dat',(chunk)=>{
    console.log('BODY:'+chunk)
  });
})
req.end(data+"\n");
req.end

